var backendApp = angular.module('backendApp', [
  'angularytics', 'ui.router', 'ngMessages', 'ngMaterial',
  'ngMdIcons',
  'oc.lazyLoad',
  'LocalStorageModule',
  'toastr',
  'ngResource',  
  'pascalprecht.translate',
  'tmh.dynamicLocale'
  ]);

/*
backendApp

.config(['$mdThemingProvider', function($mdThemingProvider) {

  $mdThemingProvider.definePalette('docs-blue', $mdThemingProvider.extendPalette('blue', {
    '50':   '#DCEFFF',
    '100':  '#AAD1F9',
    '200':  '#7BB8F5',
    '300':  '#4C9EF1',
    '400':  '#1C85ED',
    '500':  '#106CC8',
    '600':  '#0159A2',
    '700':  '#025EE9',
    '800':  '#014AB6',
    '900':  '#013583',
    'contrastDefaultColor': 'light',
    'contrastDarkColors': '50 100 200 A100',
    'contrastStrongLightColors': '300 400 A200 A400'
  }));
  $mdThemingProvider.definePalette('docs-red', $mdThemingProvider.extendPalette('red', {
    'A100': '#DE3641'
  }));
  $mdThemingProvider.theme('docs-dark', 'default')
  .primaryPalette('yellow')
  .dark();
  $mdThemingProvider.theme('default')
  .primaryPalette('docs-blue')
  .accentPalette('docs-red');
}]);
*/
backendApp
.config(function($mdThemingProvider,$mdIconProvider) {
  $mdIconProvider
      .icon('share-arrow', 'img/icons/share-arrow.svg', 24)
      .icon('upload', 'img/icons/upload.svg', 24)
      .icon('copy', 'img/icons/copy.svg', 24)
      .icon('print', 'img/icons/print.svg', 24)
      .icon('hangout', 'img/icons/hangout.svg', 24)
      .icon('mail', 'img/icons/mail.svg', 24)
      .icon('message', 'img/icons/message.svg', 24)
      .icon('copy2', 'img/icons/copy2.svg', 24)
      .icon('facebook', 'img/icons/facebook.svg', 24)
      .icon('twitter', 'img/icons/twitter.svg', 24)
      .icon('menu', 'img/icons/codepen-logo.svg',24)
      .icon('comment', 'img/icons/ic_comment_24px.svg',24);
      
  var customBlueMap =     $mdThemingProvider.extendPalette('light-blue', {
    'contrastDefaultColor': 'light',
    'contrastDarkColors': ['50'],
    '50': 'ffffff'
  });
  $mdThemingProvider.definePalette('customBlue', customBlueMap);
  $mdThemingProvider.theme('input', 'default')
    .primaryPalette('customBlue', {
      'default': '500',
      'hue-1': '50'
    })
    .accentPalette('pink');
  $mdThemingProvider.theme('default')
        .primaryPalette('blue');
});

/*
 Available palettes: red, pink, purple, deep-purple, indigo, 
 blue, light-blue, cyan, teal, green, light-green, lime, yellow, amber, orange, 
 deep-orange, brown, grey, blue-grey, customBlue
*/
backendApp
//------------------------------
// Google Analytics 
//------------------------------
.config(['AngularyticsProvider', function(AngularyticsProvider) {
 AngularyticsProvider.setEventHandlers(['Console', 'GoogleUniversal']);
}])
.run([
 'Angularytics',
 '$rootScope',
 '$timeout',
 function(Angularytics, $rootScope,$timeout) {
  Angularytics.init();
}]);




